<layout name="ins_base" />
<block name="content">
	<div class="Public">
		<!-- /container -->
		<div class="row blue-bg">
			<div class="hidden-xs" style="padding-top:120px;"></div>
			<h1 class="text-center">{:get_system_config("system_name")}</h1>
		</div>
		<div class="middle-box text-center loginscreen animated fadeInDown">
			<div>
				<form method="post" id="form_login" class="m-t">
					<div class="box">
						<input class="input" id="emp_no" name="emp_no" placeholder="帐号"/>
					</div>
					<div class="box">
						<input type="password" id="password" name="password" class="input" placeholder="密码" required="">
					</div>
					<notempty name="is_verify_code">
						<div class="box">
							<label class="input-label" for="verify">验证码：</label>
							<div class="col-sm-9 row">
								<div class="col-xs-6">
									<input class="input" id="verify" name="verify" />
								</div>
								<div class="col-xs-6">
									<img src="{:url('verify')}" style='cursor:pointer' title='刷新验证码' id='verifyImg' onclick='freshVerify()'>
								</div>
							</div>
						</div>
					</notempty>
					<div class="layui-form-item hidden">
						<span class="col-sm-3  input-label"> </span>
						<div class="col-sm-9">
							<label class="inline pull-left col-3">
								<input  type="checkbox" name="remember" value="1" />
								<span class="lbl"> </span> </label>
							<label for="remember-me">记住我的登录状态</label>
						</div>
					</div>
					<input type="button" value="登录" onclick="login();" class="btn btn-primary block full-width m-b">
				</form>
				<hr>
				<div class="m-t text-right">
					版权所有：<a href="http://www.smeoa.com">小微OA</a>
				</div>
			</div>
		</div>
</block>
<block name="js">
	<script type="text/javascript">
		function login() {
			send_form("form_login", "{:url('public/check_login')}");
		}

		function freshVerify() {
			$('#verifyImg').attr("src", $('#verifyImg').attr("src") + "&" + Math.random());
		}


		$(document).ready(function() {
			var $dom = "#password";
			if ($("#verify").length) {
				$dom = "#verify";
			}
			$($dom).keydown(function(event) {
				if (event.keyCode == 13) {
					send_form("form_login", "{:url('public/check_login')}");
					return false;
				}
			});
		});
	</script>
</block>